3.13.70 \(\int \frac {x (a+b \text {ArcTan}(c x))^2}{(d+e x^2)^2} \, dx\) [1270]

Optimal. Leaf size=457 \[ \frac {c^2 (a+b \text {ArcTan}(c x))^2}{2 \left (c^2 d-e\right ) e}-\frac {(a+b \text {ArcTan}(c x))^2}{4 d e \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {(a+b \text {ArcTan}(c x))^2}{4 d e \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {b c (a+b \text {ArcTan}(c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}+\frac {b c (a+b \text {ArcTan}(c x)) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}+\frac {i b^2 c \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}-\frac {i b^2 c \text {PolyLog}\left (2,1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}} \]

[Out]

1/2*c^2*(a+b*arctan(c*x))^2/(c^2*d-e)/e-1/2*b*c*(a+b*arctan(c*x))*ln(2*c*((-d)^(1/2)-x*e^(1/2))/(1-I*c*x)/(c*(
-d)^(1/2)-I*e^(1/2)))/(c^2*d-e)/(-d)^(1/2)/e^(1/2)+1/2*b*c*(a+b*arctan(c*x))*ln(2*c*((-d)^(1/2)+x*e^(1/2))/(1-
I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/(c^2*d-e)/(-d)^(1/2)/e^(1/2)+1/4*I*b^2*c*polylog(2,1-2*c*((-d)^(1/2)-x*e^(1/2
))/(1-I*c*x)/(c*(-d)^(1/2)-I*e^(1/2)))/(c^2*d-e)/(-d)^(1/2)/e^(1/2)-1/4*I*b^2*c*polylog(2,1-2*c*((-d)^(1/2)+x*
e^(1/2))/(1-I*c*x)/(c*(-d)^(1/2)+I*e^(1/2)))/(c^2*d-e)/(-d)^(1/2)/e^(1/2)-1/4*(a+b*arctan(c*x))^2/d/e/(1-x*e^(
1/2)/(-d)^(1/2))-1/4*(a+b*arctan(c*x))^2/d/e/(1+x*e^(1/2)/(-d)^(1/2))

________________________________________________________________________________________

Rubi [A]
time = 0.80, antiderivative size = 457, normalized size of antiderivative = 1.00, number of steps used = 27, number of rules used = 10, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.476, Rules used = {5098, 4974, 4966, 2449, 2352, 2497, 5104, 5004, 5040, 4964} \begin {gather*} \frac {c^2 (a+b \text {ArcTan}(c x))^2}{2 e \left (c^2 d-e\right )}-\frac {b c (a+b \text {ArcTan}(c x)) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}-i \sqrt {e}\right )}\right )}{2 \sqrt {-d} \sqrt {e} \left (c^2 d-e\right )}+\frac {b c (a+b \text {ArcTan}(c x)) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{(1-i c x) \left (c \sqrt {-d}+i \sqrt {e}\right )}\right )}{2 \sqrt {-d} \sqrt {e} \left (c^2 d-e\right )}-\frac {(a+b \text {ArcTan}(c x))^2}{4 d e \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {(a+b \text {ArcTan}(c x))^2}{4 d e \left (\frac {\sqrt {e} x}{\sqrt {-d}}+1\right )}+\frac {i b^2 c \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \sqrt {e} \left (c^2 d-e\right )}-\frac {i b^2 c \text {Li}_2\left (1-\frac {2 c \left (\sqrt {e} x+\sqrt {-d}\right )}{\left (\sqrt {-d} c+i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \sqrt {e} \left (c^2 d-e\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x*(a + b*ArcTan[c*x])^2)/(d + e*x^2)^2,x]

[Out]

(c^2*(a + b*ArcTan[c*x])^2)/(2*(c^2*d - e)*e) - (a + b*ArcTan[c*x])^2/(4*d*e*(1 - (Sqrt[e]*x)/Sqrt[-d])) - (a
+ b*ArcTan[c*x])^2/(4*d*e*(1 + (Sqrt[e]*x)/Sqrt[-d])) - (b*c*(a + b*ArcTan[c*x])*Log[(2*c*(Sqrt[-d] - Sqrt[e]*
x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(2*Sqrt[-d]*(c^2*d - e)*Sqrt[e]) + (b*c*(a + b*ArcTan[c*x])*Log[(
2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))])/(2*Sqrt[-d]*(c^2*d - e)*Sqrt[e]) + ((I/4)
*b^2*c*PolyLog[2, 1 - (2*c*(Sqrt[-d] - Sqrt[e]*x))/((c*Sqrt[-d] - I*Sqrt[e])*(1 - I*c*x))])/(Sqrt[-d]*(c^2*d -
 e)*Sqrt[e]) - ((I/4)*b^2*c*PolyLog[2, 1 - (2*c*(Sqrt[-d] + Sqrt[e]*x))/((c*Sqrt[-d] + I*Sqrt[e])*(1 - I*c*x))
])/(Sqrt[-d]*(c^2*d - e)*Sqrt[e])

Rule 2352

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLog[2, 1 - c*x], x] /; FreeQ[{c, d, e
}, x] && EqQ[e + c*d, 0]

Rule 2449

Int[Log[(c_.)/((d_) + (e_.)*(x_))]/((f_) + (g_.)*(x_)^2), x_Symbol] :> Dist[-e/g, Subst[Int[Log[2*d*x]/(1 - 2*
d*x), x], x, 1/(d + e*x)], x] /; FreeQ[{c, d, e, f, g}, x] && EqQ[c, 2*d] && EqQ[e^2*f + d^2*g, 0]

Rule 2497

Int[Log[u_]*(Pq_)^(m_.), x_Symbol] :> With[{C = FullSimplify[Pq^m*((1 - u)/D[u, x])]}, Simp[C*PolyLog[2, 1 - u
], x] /; FreeQ[C, x]] /; IntegerQ[m] && PolyQ[Pq, x] && RationalFunctionQ[u, x] && LeQ[RationalFunctionExponen
ts[u, x][[2]], Expon[Pq, x]]

Rule 4964

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x])^p)*(
Log[2/(1 + e*(x/d))]/e), x] + Dist[b*c*(p/e), Int[(a + b*ArcTan[c*x])^(p - 1)*(Log[2/(1 + e*(x/d))]/(1 + c^2*x
^2)), x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0] && EqQ[c^2*d^2 + e^2, 0]

Rule 4966

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-(a + b*ArcTan[c*x]))*(Log[2/(1
 - I*c*x)]/e), x] + (Dist[b*(c/e), Int[Log[2/(1 - I*c*x)]/(1 + c^2*x^2), x], x] - Dist[b*(c/e), Int[Log[2*c*((
d + e*x)/((c*d + I*e)*(1 - I*c*x)))]/(1 + c^2*x^2), x], x] + Simp[(a + b*ArcTan[c*x])*(Log[2*c*((d + e*x)/((c*
d + I*e)*(1 - I*c*x)))]/e), x]) /; FreeQ[{a, b, c, d, e}, x] && NeQ[c^2*d^2 + e^2, 0]

Rule 4974

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a
 + b*ArcTan[c*x])^p/(e*(q + 1))), x] - Dist[b*c*(p/(e*(q + 1))), Int[ExpandIntegrand[(a + b*ArcTan[c*x])^(p -
1), (d + e*x)^(q + 1)/(1 + c^2*x^2), x], x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 1] && IntegerQ[q] && N
eQ[q, -1]

Rule 5004

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(a + b*ArcTan[c*x])^(p +
 1)/(b*c*d*(p + 1)), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[e, c^2*d] && NeQ[p, -1]

Rule 5040

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2), x_Symbol] :> Simp[(-I)*((a + b*ArcT
an[c*x])^(p + 1)/(b*e*(p + 1))), x] - Dist[1/(c*d), Int[(a + b*ArcTan[c*x])^p/(I - c*x), x], x] /; FreeQ[{a, b
, c, d, e}, x] && EqQ[e, c^2*d] && IGtQ[p, 0]

Rule 5098

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*(x_))/((d_) + (e_.)*(x_)^2)^2, x_Symbol] :> Dist[1/(4*d^2*Rt[-e/
d, 2]), Int[(a + b*ArcTan[c*x])^p/(1 - Rt[-e/d, 2]*x)^2, x], x] - Dist[1/(4*d^2*Rt[-e/d, 2]), Int[(a + b*ArcTa
n[c*x])^p/(1 + Rt[-e/d, 2]*x)^2, x], x] /; FreeQ[{a, b, c, d, e}, x] && IGtQ[p, 0]

Rule 5104

Int[(((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(m_.))/((d_) + (e_.)*(x_)^2), x_Symbol] :> I
nt[ExpandIntegrand[(a + b*ArcTan[c*x])^p/(d + e*x^2), (f + g*x)^m, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& IGtQ[p, 0] && EqQ[e, c^2*d] && IGtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {x \left (a+b \tan ^{-1}(c x)\right )^2}{\left (d+e x^2\right )^2} \, dx &=\frac {\int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )^2} \, dx}{4 (-d)^{3/2} \sqrt {e}}-\frac {\int \frac {\left (a+b \tan ^{-1}(c x)\right )^2}{\left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )^2} \, dx}{4 (-d)^{3/2} \sqrt {e}}\\ &=-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}+\frac {(b c) \int \left (\frac {\sqrt {-d} e \left (a+b \tan ^{-1}(c x)\right )}{\left (c^2 d-e\right ) \left (-\sqrt {-d}+\sqrt {e} x\right )}+\frac {c^2 d \left (\sqrt {-d}+\sqrt {e} x\right ) \left (a+b \tan ^{-1}(c x)\right )}{\sqrt {-d} \left (c^2 d-e\right ) \left (1+c^2 x^2\right )}\right ) \, dx}{2 d e}+\frac {(b c) \int \left (\frac {\sqrt {-d} e \left (a+b \tan ^{-1}(c x)\right )}{\left (-c^2 d+e\right ) \left (\sqrt {-d}+\sqrt {e} x\right )}+\frac {c^2 \left (d+\sqrt {-d} \sqrt {e} x\right ) \left (a+b \tan ^{-1}(c x)\right )}{\left (c^2 d-e\right ) \left (1+c^2 x^2\right )}\right ) \, dx}{2 d e}\\ &=-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {(b c) \int \frac {a+b \tan ^{-1}(c x)}{-\sqrt {-d}+\sqrt {e} x} \, dx}{2 \sqrt {-d} \left (c^2 d-e\right )}+\frac {(b c) \int \frac {a+b \tan ^{-1}(c x)}{\sqrt {-d}+\sqrt {e} x} \, dx}{2 \sqrt {-d} \left (c^2 d-e\right )}+\frac {\left (b c^3\right ) \int \frac {\left (\sqrt {-d}+\sqrt {e} x\right ) \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{2 \sqrt {-d} \left (c^2 d-e\right ) e}+\frac {\left (b c^3\right ) \int \frac {\left (d+\sqrt {-d} \sqrt {e} x\right ) \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2} \, dx}{2 d \left (c^2 d-e\right ) e}\\ &=-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {b c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}+\frac {b c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}+\frac {\left (b c^3\right ) \int \left (\frac {\sqrt {-d} \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2}+\frac {\sqrt {e} x \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2}\right ) \, dx}{2 \sqrt {-d} \left (c^2 d-e\right ) e}+\frac {\left (b c^3\right ) \int \left (\frac {d \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2}+\frac {\sqrt {-d} \sqrt {e} x \left (a+b \tan ^{-1}(c x)\right )}{1+c^2 x^2}\right ) \, dx}{2 d \left (c^2 d-e\right ) e}+\frac {\left (b^2 c^2\right ) \int \frac {\log \left (\frac {2 c \left (-\sqrt {-d}+\sqrt {e} x\right )}{\left (-c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{1+c^2 x^2} \, dx}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}-\frac {\left (b^2 c^2\right ) \int \frac {\log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{1+c^2 x^2} \, dx}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}\\ &=-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {b c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}+\frac {b c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}+\frac {i b^2 c \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}-\frac {i b^2 c \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}+2 \frac {\left (b c^3\right ) \int \frac {a+b \tan ^{-1}(c x)}{1+c^2 x^2} \, dx}{2 \left (c^2 d-e\right ) e}\\ &=\frac {c^2 \left (a+b \tan ^{-1}(c x)\right )^2}{2 \left (c^2 d-e\right ) e}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {\left (a+b \tan ^{-1}(c x)\right )^2}{4 d e \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}-\frac {b c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}+\frac {b c \left (a+b \tan ^{-1}(c x)\right ) \log \left (\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{2 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}+\frac {i b^2 c \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}-\sqrt {e} x\right )}{\left (c \sqrt {-d}-i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}-\frac {i b^2 c \text {Li}_2\left (1-\frac {2 c \left (\sqrt {-d}+\sqrt {e} x\right )}{\left (c \sqrt {-d}+i \sqrt {e}\right ) (1-i c x)}\right )}{4 \sqrt {-d} \left (c^2 d-e\right ) \sqrt {e}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 6.50, size = 836, normalized size = 1.83 \begin {gather*} \frac {1}{4} \left (-\frac {2 a^2}{e \left (d+e x^2\right )}+\frac {4 a b \left (-\frac {\left (1+c^2 x^2\right ) \text {ArcTan}(c x)}{d+e x^2}+\frac {c \text {ArcTan}\left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{\sqrt {d} \sqrt {e}}\right )}{-c^2 d+e}+\frac {b^2 c^2 \left (\frac {4 \text {ArcTan}(c x)^2}{c^2 d+e+\left (c^2 d-e\right ) \cos (2 \text {ArcTan}(c x))}+\frac {-4 \text {ArcTan}(c x) \tanh ^{-1}\left (\frac {c d}{\sqrt {-c^2 d e} x}\right )-2 \text {ArcCos}\left (-\frac {c^2 d+e}{c^2 d-e}\right ) \tanh ^{-1}\left (\frac {c e x}{\sqrt {-c^2 d e}}\right )+\left (\text {ArcCos}\left (-\frac {c^2 d+e}{c^2 d-e}\right )+2 i \tanh ^{-1}\left (\frac {c e x}{\sqrt {-c^2 d e}}\right )\right ) \log \left (\frac {2 c d \left (-i e+\sqrt {-c^2 d e}\right ) (-i+c x)}{\left (c^2 d-e\right ) \left (c d+\sqrt {-c^2 d e} x\right )}\right )+\left (\text {ArcCos}\left (-\frac {c^2 d+e}{c^2 d-e}\right )-2 i \tanh ^{-1}\left (\frac {c e x}{\sqrt {-c^2 d e}}\right )\right ) \log \left (\frac {2 c d \left (i e+\sqrt {-c^2 d e}\right ) (i+c x)}{\left (c^2 d-e\right ) \left (c d+\sqrt {-c^2 d e} x\right )}\right )-\left (\text {ArcCos}\left (-\frac {c^2 d+e}{c^2 d-e}\right )-2 i \left (\tanh ^{-1}\left (\frac {c d}{\sqrt {-c^2 d e} x}\right )+\tanh ^{-1}\left (\frac {c e x}{\sqrt {-c^2 d e}}\right )\right )\right ) \log \left (\frac {\sqrt {2} \sqrt {-c^2 d e} e^{-i \text {ArcTan}(c x)}}{\sqrt {c^2 d-e} \sqrt {c^2 d+e+\left (c^2 d-e\right ) \cos (2 \text {ArcTan}(c x))}}\right )-\left (\text {ArcCos}\left (-\frac {c^2 d+e}{c^2 d-e}\right )+2 i \left (\tanh ^{-1}\left (\frac {c d}{\sqrt {-c^2 d e} x}\right )+\tanh ^{-1}\left (\frac {c e x}{\sqrt {-c^2 d e}}\right )\right )\right ) \log \left (\frac {\sqrt {2} \sqrt {-c^2 d e} e^{i \text {ArcTan}(c x)}}{\sqrt {c^2 d-e} \sqrt {c^2 d+e+\left (c^2 d-e\right ) \cos (2 \text {ArcTan}(c x))}}\right )-i \left (\text {PolyLog}\left (2,\frac {\left (c^2 d+e-2 i \sqrt {-c^2 d e}\right ) \left (c d-\sqrt {-c^2 d e} x\right )}{\left (c^2 d-e\right ) \left (c d+\sqrt {-c^2 d e} x\right )}\right )-\text {PolyLog}\left (2,\frac {\left (c^2 d+e+2 i \sqrt {-c^2 d e}\right ) \left (c d-\sqrt {-c^2 d e} x\right )}{\left (c^2 d-e\right ) \left (c d+\sqrt {-c^2 d e} x\right )}\right )\right )}{\sqrt {-c^2 d e}}\right )}{c^2 d-e}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x*(a + b*ArcTan[c*x])^2)/(d + e*x^2)^2,x]

[Out]

((-2*a^2)/(e*(d + e*x^2)) + (4*a*b*(-(((1 + c^2*x^2)*ArcTan[c*x])/(d + e*x^2)) + (c*ArcTan[(Sqrt[e]*x)/Sqrt[d]
])/(Sqrt[d]*Sqrt[e])))/(-(c^2*d) + e) + (b^2*c^2*((4*ArcTan[c*x]^2)/(c^2*d + e + (c^2*d - e)*Cos[2*ArcTan[c*x]
]) + (-4*ArcTan[c*x]*ArcTanh[(c*d)/(Sqrt[-(c^2*d*e)]*x)] - 2*ArcCos[-((c^2*d + e)/(c^2*d - e))]*ArcTanh[(c*e*x
)/Sqrt[-(c^2*d*e)]] + (ArcCos[-((c^2*d + e)/(c^2*d - e))] + (2*I)*ArcTanh[(c*e*x)/Sqrt[-(c^2*d*e)]])*Log[(2*c*
d*((-I)*e + Sqrt[-(c^2*d*e)])*(-I + c*x))/((c^2*d - e)*(c*d + Sqrt[-(c^2*d*e)]*x))] + (ArcCos[-((c^2*d + e)/(c
^2*d - e))] - (2*I)*ArcTanh[(c*e*x)/Sqrt[-(c^2*d*e)]])*Log[(2*c*d*(I*e + Sqrt[-(c^2*d*e)])*(I + c*x))/((c^2*d
- e)*(c*d + Sqrt[-(c^2*d*e)]*x))] - (ArcCos[-((c^2*d + e)/(c^2*d - e))] - (2*I)*(ArcTanh[(c*d)/(Sqrt[-(c^2*d*e
)]*x)] + ArcTanh[(c*e*x)/Sqrt[-(c^2*d*e)]]))*Log[(Sqrt[2]*Sqrt[-(c^2*d*e)])/(Sqrt[c^2*d - e]*E^(I*ArcTan[c*x])
*Sqrt[c^2*d + e + (c^2*d - e)*Cos[2*ArcTan[c*x]]])] - (ArcCos[-((c^2*d + e)/(c^2*d - e))] + (2*I)*(ArcTanh[(c*
d)/(Sqrt[-(c^2*d*e)]*x)] + ArcTanh[(c*e*x)/Sqrt[-(c^2*d*e)]]))*Log[(Sqrt[2]*Sqrt[-(c^2*d*e)]*E^(I*ArcTan[c*x])
)/(Sqrt[c^2*d - e]*Sqrt[c^2*d + e + (c^2*d - e)*Cos[2*ArcTan[c*x]]])] - I*(PolyLog[2, ((c^2*d + e - (2*I)*Sqrt
[-(c^2*d*e)])*(c*d - Sqrt[-(c^2*d*e)]*x))/((c^2*d - e)*(c*d + Sqrt[-(c^2*d*e)]*x))] - PolyLog[2, ((c^2*d + e +
 (2*I)*Sqrt[-(c^2*d*e)])*(c*d - Sqrt[-(c^2*d*e)]*x))/((c^2*d - e)*(c*d + Sqrt[-(c^2*d*e)]*x))]))/Sqrt[-(c^2*d*
e)]))/(c^2*d - e))/4

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1208 vs. \(2 (377 ) = 754\).
time = 5.20, size = 1209, normalized size = 2.65 Too large to display

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*arctan(c*x))^2/(e*x^2+d)^2,x,method=_RETURNVERBOSE)

[Out]

1/c^2*(-1/2*a^2*c^4/e/(c^2*e*x^2+c^2*d)-1/2*b^2*c^4/e/(c^2*e*x^2+c^2*d)*arctan(c*x)^2+b^2*c^4/(c^2*d-e)/(c^4*d
^2-2*c^2*d*e+e^2)*arctan(c*x)^2*(c^2*d*e)^(1/2)+1/2*b^2*c^4/(c^2*d-e)/(c^4*d^2-2*c^2*d*e+e^2)*polylog(2,(c^2*d
-e)*(1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d-2*(c^2*d*e)^(1/2)-e))*(c^2*d*e)^(1/2)-1/4*b^2*c^2*e/(c^2*d-e)/d/(c^4*d^2-2
*c^2*d*e+e^2)*polylog(2,(c^2*d-e)*(1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d-2*(c^2*d*e)^(1/2)-e))*(c^2*d*e)^(1/2)-1/4*b^
2*c^6/e/(c^2*d-e)/(c^4*d^2-2*c^2*d*e+e^2)*polylog(2,(c^2*d-e)*(1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d-2*(c^2*d*e)^(1/2
)-e))*(c^2*d*e)^(1/2)*d+1/2*b^2*c^2/e*(c^2*d*e)^(1/2)/(c^2*d-e)/d*arctan(c*x)^2+1/2*b^2*c^4/e*arctan(c*x)^2/(c
^2*d-e)+I*b^2*c^4*ln(1-(c^2*d-e)*(1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d-2*(c^2*d*e)^(1/2)-e))*arctan(c*x)/(c^2*d-e)/(
c^4*d^2-2*c^2*d*e+e^2)*(c^2*d*e)^(1/2)+1/2*I*b^2*c^2/e*(c^2*d*e)^(1/2)/(c^2*d-e)/d*arctan(c*x)*ln(1-(c^2*d-e)*
(1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d+2*(c^2*d*e)^(1/2)-e))-1/2*I*b^2*c^6/e*ln(1-(c^2*d-e)*(1+I*c*x)^2/(c^2*x^2+1)/(
-c^2*d-2*(c^2*d*e)^(1/2)-e))*arctan(c*x)/(c^2*d-e)/(c^4*d^2-2*c^2*d*e+e^2)*(c^2*d*e)^(1/2)*d-1/2*I*b^2*c^2*e*l
n(1-(c^2*d-e)*(1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d-2*(c^2*d*e)^(1/2)-e))*arctan(c*x)/(c^2*d-e)/d/(c^4*d^2-2*c^2*d*e
+e^2)*(c^2*d*e)^(1/2)-1/2*b^2*c^2*e/(c^2*d-e)/d/(c^4*d^2-2*c^2*d*e+e^2)*arctan(c*x)^2*(c^2*d*e)^(1/2)-1/2*b^2*
c^6/e/(c^2*d-e)/(c^4*d^2-2*c^2*d*e+e^2)*arctan(c*x)^2*(c^2*d*e)^(1/2)*d+1/4*b^2*c^2/e*(c^2*d*e)^(1/2)/(c^2*d-e
)/d*polylog(2,(c^2*d-e)*(1+I*c*x)^2/(c^2*x^2+1)/(-c^2*d+2*(c^2*d*e)^(1/2)-e))-a*b*c^4/e/(c^2*e*x^2+c^2*d)*arct
an(c*x)-a*b*c^3/(c^2*d-e)/(d*e)^(1/2)*arctan(e*x/(d*e)^(1/2))+a*b*c^4/e/(c^2*d-e)*arctan(c*x))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2/(e*x^2+d)^2,x, algorithm="maxima")

[Out]

(c*(c*arctan(c*x)/(c^2*d*e - e^2) - arctan(x*e^(1/2)/sqrt(d))*e^(-1/2)/((c^2*d - e)*sqrt(d))) - arctan(c*x)/(x
^2*e^2 + d*e))*a*b - 1/32*(4*arctan(c*x)^2 - 32*(x^2*e^2 + d*e)*integrate(1/16*(12*(c^2*x^3*e + x*e)*arctan(c*
x)^2 + (c^2*x^3*e + x*e)*log(c^2*x^2 + 1)^2 + 4*(c*x^2*e + c*d)*arctan(c*x) - 2*(c^2*x^3*e + c^2*d*x)*log(c^2*
x^2 + 1))/(c^2*x^6*e^3 + (2*c^2*d*e^2 + e^3)*x^4 + (c^2*d^2*e + 2*d*e^2)*x^2 + d^2*e), x) - log(c^2*x^2 + 1)^2
)*b^2/(x^2*e^2 + d*e) - 1/2*a^2/(x^2*e^2 + d*e)

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2/(e*x^2+d)^2,x, algorithm="fricas")

[Out]

integral((b^2*x*arctan(c*x)^2 + 2*a*b*x*arctan(c*x) + a^2*x)/(x^4*e^2 + 2*d*x^2*e + d^2), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {x \left (a + b \operatorname {atan}{\left (c x \right )}\right )^{2}}{\left (d + e x^{2}\right )^{2}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*atan(c*x))**2/(e*x**2+d)**2,x)

[Out]

Integral(x*(a + b*atan(c*x))**2/(d + e*x**2)**2, x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*arctan(c*x))^2/(e*x^2+d)^2,x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {x\,{\left (a+b\,\mathrm {atan}\left (c\,x\right )\right )}^2}{{\left (e\,x^2+d\right )}^2} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*(a + b*atan(c*x))^2)/(d + e*x^2)^2,x)

[Out]

int((x*(a + b*atan(c*x))^2)/(d + e*x^2)^2, x)

________________________________________________________________________________________